﻿// Copyright 2009 Mike Geise
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Falcon.Core.Domain.Services
{
	using System.Collections.Generic;
	using Falcon.Core.Collections;
	using Falcon.Core.Domain.Values;
	using TimeZone = Falcon.Core.Domain.TimeZone;

	public interface ITimeZoneService
	{
		/// <summary>
		/// Gets the time zone by the specified specification.
		/// </summary>
		/// <param name="specification">The <see cref="TimeZoneSpecification"/>.</param>
		TimeZone GetBy(TimeZoneSpecification specification);

		/// <summary>
		/// Gets the time zone by id.
		/// </summary>
		/// <param name="id">The id.</param>
		TimeZone GetById(int id);

		/// <summary>
		/// Gets all the time zones.
		/// </summary>
		IList<TimeZone> GetAll();

		/// <summary>
		/// Gets all the time zones by the specified specification.
		/// </summary>
		/// <param name="specification">The <see cref="CountrySpecification"/>.</param>
		IPagedList<TimeZone, TimeZoneSpecification> GetPaged(TimeZoneSpecification specification);

		/// <summary>
		/// Gets the count of time zones.
		/// </summary>
		/// <returns></returns>
		int Count();

		/// <summary>
		/// Creates the time zone.
		/// </summary>
		TimeZone Create();

		/// <summary>
		/// Populates the storage for the first time.
		/// </summary>
		void Setup();

		/// <summary>
		/// Inserts the specified time zone.
		/// </summary>
		/// <param name="timeZone">The <see cref="TimeZone"/>.</param>
		void Insert(TimeZone timeZone);

		/// <summary>
		/// Inserts the specified time zone.
		/// </summary>
		/// <param name="timeZone">The time zone.</param>
		/// <param name="value">The value.</param>
		void Insert(TimeZone timeZone, TimeZoneCreate value);

		/// <summary>
		/// Updates the specified time zone.
		/// </summary>
		/// <param name="timeZone">The <see cref="TimeZone"/>.</param>
		void Update(TimeZone timeZone);

		/// <summary>
		/// Updates the specified time zone.
		/// </summary>
		/// <param name="timeZone">The time zone.</param>
		/// <param name="value">The value.</param>
		void Update(TimeZone timeZone, TimeZoneUpdate value);

		/// <summary>
		/// Deletes the specified time zone.
		/// </summary>
		/// <param name="timeZone">The <see cref="TimeZone"/>.</param>
		void Delete(TimeZone timeZone);
	}
}